
const doctorService = require('../service/doctorService.js');
module.exports = {
    // 查询分院
    async selectbranch(req, res) {
        let result = await doctorService.selectbranch(req.query);
        res.send(result);
    },
    // 查询科室
    async selectdepartment(req, res) {
        let result = await doctorService.selectdepartment(req.query);
        res.send(result);
    },
    // 按照部门查询
    async selectbranchfromdoctor(req, res) {
        let result = await doctorService.selectbranchfromdoctor(req.query);
        res.send(result);
    },
    // 按照科室查询
    async selectdepartmentfromdoctor(req, res) {
        let result = await doctorService.selectdepartmentfromdoctor(req.query);
        res.send(result);
    },
    // 查询全部
    async select(req, res) {
        let result = await doctorService.select();
        res.send(result);
    },
    // 新增医生
    async add(req, res) {
        let result = await doctorService.add(req.body);
        res.send(result);
    },
    // 删除医生
    async del(req, res) {
        let result = await doctorService.del(req.query);
        res.send(result);
    },
    // 更新医生
    async update(req, res) {
        let result = await doctorService.update(req.body);
        res.send(result);
    },
    // 按照姓名查询
    async selectbyname(req, res) {
        let result = await doctorService.selectbyname(req.query);
        res.send(result);
    }
}
